﻿using PBO.Data;
using System.Windows.Forms;

namespace PBO.Util
{
    public static class ModShare
    {

        #region Dialog

        public delegate DialogResult MessageDelegate(Form form, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon);

        public static DialogResult ShowInformation(Form form, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            if (form.InvokeRequired)
            {
                return (DialogResult)form.Invoke(new MessageDelegate(ShowInformation), form, message, caption, buttons, icon);
            }
            else
            {
                return MessageBox.Show(message, caption, buttons, icon);
            }
        }

        #endregion

        public static string GetVersionInfo()
        {
            return Application.ProductVersion;
        }

    }
}
